import pytest

@pytest.fixture()
def myfixture(request):
    print("执行myfixture固件--%s" % request.param)
    return "你好"

class Test_Pytest():
        #@pytest.mark.parametrize("myfixture",["logging.conf","2"],indirect=False)
        @pytest.mark.parametrize("myfixture",["logging.conf","2"],indirect=True)
        def test_one(self,myfixture):
                print("test_one方法执行" )
                print (myfixture)
                assert 1==1

        def test_two(self):
                print("test_two方法执行" )
                assert "o" in "love"

        def test_three(self):
                print("test_three方法执行" )
                assert 3-2==1

if __name__=="__main__":
    pytest.main(['-s','indirect=true的用法.py'])
